Public Class frmMain

    Private Sub frmMain_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
        'Exit the loop.
        ExitLoop = True

        'Cancel closing the form.
        e.Cancel = True
    End Sub

    Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'Set the window to the spefied size.
        Me.ClientSize = New Size(scrWidth, scrHeight)
    End Sub

    Private Sub frmMain_Shown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shown
        'Setup TV3D
        SetupTV3Dbasic(Me.Handle.ToInt32)
        RenderLoading()
        SetupTV3Drest()

        'Load everything.
        Misc.Load()

        'Start the loop.
        modLoop.StartLoop()
    End Sub
End Class
